package com.pro.dao;

import com.pro.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName: UserMapper
 * @Author: 笑笑
 * @DATE: 2021/11/6
 * @TIME: 下午 03:18
 */
public interface UserMapper {

    //根据用户名查询用户
    @Select("SELECT user_id FROM js_user WHERE true_name LIKE '%${createName}%'")
    Integer getByName(String createName);

    //根据用户id修改用户信息
    Boolean updateUser(User user);

    //查询所有的用户
    List<User> getAllUser(User user);

    //根据id查询用户
    User getById(Integer id);

    //添加一个用户
    Boolean addUser(User user);
}
